'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  router.get('/data',controller.home.getdata);
  router.resources('myong','/myong',controller.zsgc);
  router.get('/guo',controller.zsgc.guo);
  //session页面
  router.get('/session',controller.session.index);
  router.get('/session/login',controller.session.login)
  router.post('/session/post',controller.session.post)
  router.get('/session/loginout',controller.session.loginout)
  //jwt页面
  router.get('/jwt',controller.jwt.index);
  router.post('/jwt/jwtlogin',controller.jwt.jwtlogin);
  router.get('/jwt/jwtdata',app.middleware.checktoken(),controller.jwt.jwtdata)
  router.resources('sequelize','/clazz',controller.clazz);
  router.resources('xue','/xue',controller.xue);
  router.resources('service','/service',app.middleware.checktoken(),controller.services);
  router.post('/md',controller.home.md);
  router.get('/mds',controller.home.mds);
  router.post('/node',controller.home.node);
};
